package com.springboot.demo.controller;

import com.cx.item.common.constants.ResultCode;
import com.cx.item.common.vo.ResultPageVo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Heavin on 2017/11/7.
 * Des  公开接口  不需要登陆接口结合
 */
@RestController
@RequestMapping(value = "/comm")
public class CommonController {

    @RequestMapping(value = "/repeatRequest")
    public ResultPageVo repeatRequest() {
        return ResultPageVo.create(ResultCode.FAILURE, "操作失败：请不要重复请求");
    }

    @RequestMapping(value = "/tokenerror")
    public ResultPageVo tokenError() {
        return ResultPageVo.create(ResultCode.TOKEN_ERROR, "操作失败：请重新登录");
    }

    @RequestMapping(value = "/permissionerror")
    public ResultPageVo permissionError() {
        return ResultPageVo.create(ResultCode.PERMISSION_ERROR, "操作失败：权限不足");
    }


}
